import request from "@/utils/request";
// 品牌列表
export function brandList(query) {
  return request({
    url: "/commodity/brand/listPri",
    method: "get",
    params: query,
  });
}
//查询应用场景列表接口
export function tagListAllPri() {
  return request({
    url: "/commodity/tag/tagListAllPri",
    method: "get",
  });
}

//更新排序
export function changeSort(data) {
  return request({
    url: "/commodity/brand/changeSort",
    method: "put",
    data,
  });
}
// 添加品牌
export function addCrand(data) {
  return request({
    url: "/commodity/brand/add",
    method: "post",
    data,
  });
}
//查询编辑品牌
export function getBrandQuery(id) {
  return request({
    url: "/commodity/brand/getBrandInfo/" + id,
    method: "get",
  });
}
// 更新品牌
export function updateBrandedit(data) {
  return request({
    url: "/commodity/brand/edit",
    method: "post",
    data,
  });
}

// 删除品牌
export function delBrand(deptId) {
  return request({
    url: "/commodity/brand/removeGiftBrand/" + deptId,
    method: "delete",
  });
}
//是否再首页展示
export function handleShowIndex(data) {
  return request({
    url: "/commodity/brand/isShowIndex",
    method: "put",
    data,
  });
}
//是否展示
export function changeShow(data) {
  return request({
    url: "/commodity/brand/isShow",
    method: "put",
    data,
  });
}
// 本地品牌列表
export function localBrandList(query) {
  return request({
    url: "/commodity/brand/showAllBrandList",
    method: "get",
    params: query,
  });
}
// 提交品牌
export function addBrand(data) {
  return request({
    url: "/commodity/brand/addMallBrand",
    method: "post",
    data,
  });
}
export function allBrandList() {
  return request({
    url: "/commodity/brand/brandListPri",
    method: "get",
  });
}
